<?php
class Application_Form_List_OrderForm extends Zend_Form
{
	private $_sortField = array();
	
	function __construct($values)
	{
		foreach ($values as $key => $value)
		{
			$this->_sortField[$key] = $value;
		}
		parent::__construct($values);
	}
	
	public function init()
	{	
		$element = new Zend_Form_Element_Select('element');
		$element->setLabel("Sort by:")->setMultiOptions($this->_sortField);

		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setAttrib('id', 'submitbutton')->setLabel('Submit');

		$this->addElements(array($element, $submit));
	}
}